package com.jinsp.componentrouter;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.jinsp.componentrouter.activity.TestActivity;
import com.jinsp.router_annotation.IntentParameter;
import com.jinsp.router_annotation.RegisterRouter;

import java.util.ArrayList;

@RegisterRouter(group = "app", path = "app/MainActivity")
public class MainActivity extends AppCompatActivity {

    @IntentParameter(name = "haha")
    ArrayList<String> list;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void onClick(View view) {
        Intent intent = new Intent(this, TestActivity.class);
        Bundle bundle = new Bundle();
        bundle.putString("test_name", "hahahahahah");
        intent.putExtras(bundle);
        startActivity(intent);
    }
}